package com.imooc.miaosha.util;


import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.UUID;

public class Md5Util {
public static final String salt="qwert..";
    private static String md5(String str) {

      return   DigestUtils.md5Hex(str);
    }

    private static String inputFromForm(String str) {
    String password=str+salt.charAt(3)+salt.charAt(0)+str+salt.charAt(5)+salt.charAt(6);
    return md5(password);
    }
    public static String passwordToDB(String str, String dbSalt){
        String password=str+dbSalt;

        return inputFromForm(password);
    }

    public static void main(String[] args) {
     System.out.println(Md5Util.passwordToDB("690313","fb1293842018421"));
    }
  
}
